<?php
/*
 * Created on Feb 5, 2008
 *
 * This is an open source software, please obey the GPL
 * The Referee Service is offered by Cacomand Inc. 
 * View Http://www.cacomand.com for support or more information
 * You can also view distrema.googlecode.com to join the community.
 */
 include("lib_dps.php");
 class address_book_user extends dps_user
 {
 	function set_school($school_type,$school_name)
 	{
 		if($school_type=="小学" || $school_type=="初中" || $school_type=="高中" || $school_type=="大学" || $school_type=="硕士" || $school_type=="博士")
 		{
 			$this->reset_record(11,$school_type,$school_name);
 			return true;
 		}
 		else
 		{
 			echo($school_type."不是合法的学校类型");
 			return false;
 		}
 	}
 	
 	function set_class($school_type,$class_name)
 	{
 		if($school_type=="小学" || $school_type=="初中" || $school_type=="高中" || $school_type=="大学" || $school_type=="硕士" || $school_type=="博士")
 		{
 			$this->reset_record(12,$school_type,$class_name);
 			return true;
 		}
 		else
 		{
 			echo($school_type."不是合法的学校类型");
 			return false;
 		}
 	}
 	
 	function set_major($school_type,$major_name)
 	{
 		if($school_type=="高中" || $school_type=="大学" || $school_type=="硕士" || $school_type=="博士")
 		{
 			$this->reset_record(13,$school_type,$major_name);
 			return true;
 		}
 		else
 		{
 			echo($school_type."不是合法的学校类型");
 			return false;
 		}
 	}
 	
 	function set_mobile($mobile_type,$mobile)
 	{
 		$this->reset_record(14,$mobile_type,$mobile);
 		return true;
 	}
 	
 	function add_known_mate($school_name,$class_name,$his_epsn,$his_user_ID)
 	{
 		$this->add_record(15,$school_name.$class_name,$his_epsn.$his_user_ID);
 	}
 }
?>
